import request from "@/utils/request";

export function getList({ currentPage, pageSize,examType ,mineType,scope}) {
  return request({
    url: `app/exam/exam/list?currentPage=${currentPage}&pageSize=${pageSize}`,
    method: "POST",
    data: {examType,mineType,scope},
  });
}

export function paperQugetList({ paperId }) {
  return request({
    url: `app/exam/paperQu/getList`,
    method: "POST",
    data: {paperId:paperId},
  });
}

// 试卷详情
export function examdetail({ id }) {
  return request({
    url: `app/exam/exam/detail`,
    method: "POST",
    data: {
      id: id,
    },
  });
}
// 反馈
export function examfeedbacksave(data) {
  return request({
    url: `app/exam/feedback/save`,
    method: "POST",
    data
  });
}

// 创建考试试卷
export function examcreatePaper({ examId, memberId }) {
  return request({
    url: `app/exam/paper/createPaper`,
    method: "POST",
    data: {
      examId: examId,
      memberId: memberId,
    },
  });
}

export function examcheckProcess({ memberId }) {
  return request({
    url: `app/exam/paper/checkProcess`,
    method: "POST",
    data: {
      memberId: memberId,
    },
  });
}
// 试卷详情
export function exampaperDetail({ id }) {
  return request({
    url: `app/exam/paper/paperDetail`,
    method: "POST",
    data: {
      id,
    },
  });
}
// 每一道题
export function examquDetail({ paperId, quId }) {
  return request({
    url: `app/exam/paper/quDetail`,
    method: "POST",
    data: {
      paperId,
      quId,
    },
  });
}

//提交题目
export function examPaddingAnswer({ paperId, answers, quId }) {
  return request({
    url: `app/exam/paper/PaddingAnswer`,
    method: "POST",
    data: {
      answers,
      paperId,
      quId,
    },
  });
}

// 交卷
export function examhandExam({ id, memberId }) {
  return request({
    url: `app/exam/paper/handExam`,
    method: "POST",
    data: {
      id,
      memberId,
    },
  });
}
// 考试完详情
export function exampaperResult({ id, memberId }) {
  return request({
    url: `app/exam/paper/paperResult`,
    method: "POST",
    data: {
      id,
      memberId,
    },
  });
}
// 考试次数
export function exampaperMember(data) { 
  return request({
    url: 'app/exam/paperMember/getByMemberId',
    method: 'post',
    data
    
  })
}
